layui.use(['element','layer'], function(){
    var element = layui.element,layer = layui.layer;
    var Content = {}
    Content.clickTab = function(){
        var dataUrl = $(this).data('url');
        $(".J_iframe").attr('src',dataUrl);
        //显示loading提示
        var loading = layer.load();
        $('.J_mainContent iframe').load(function () {
            //iframe加载完成后隐藏loading提示
            layer.close(loading);
        });
    }

    Content.removeActive = function(){
        $('.layui-tab-title .layui-this').removeClass('layui-this');
    }
    $('.main-nav-tab').on('click', Content.clickTab);
    $('.tab-other').on('click',Content.removeActive);
});